<%--
    Document   : index
    Created on : 16/06/2009, 15:08:00
    Author     : ademar.concrete
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<%@page  import="data.CategoriaController" %>
<%@page  import="java.util.List" %>
<%@page  import="java.util.Iterator" %>
<%@page  import="persistencia.entidade.Categoria" %>

<wml>
    <card id="categoriaRaiz" title="Categoria">
        <p align="center"></p>
        <p>

            <%
                CategoriaController catController = (CategoriaController)request.getSession().getAttribute("CatController");

                List<Categoria> cats = catController.findCategoria();


                for (Iterator<Categoria> it = cats.iterator(); it.hasNext();) {
                   Categoria categoria = it.next();
                   %>
                        <a title="<%=categoria.getNome()%>" href="Categoria.jsp?catId=<%=categoria.getCategoriaId()%>"><%=categoria.getNome()%></a><br/>
                   <%
                }
            %>
            <br/>
            <a title="Voltar" href="index.jsp">Voltar</a><br/>
        </p>
    </card>
    
</wml>


